ConcurrentStack(T) Constructor (IEnumerable(T))

Task Parallel System.Threading

Initializes a new instance of the ConcurrentStack<(Of <(T>)>) class that contains elements copied from the specified collection

Namespace:  System.Collections.Concurrent
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Sub New ( _
	collection As IEnumerable(Of T) _
)
C#
public ConcurrentStack(
	IEnumerable<T> collection
)

Parameters

collection
Type: System.Collections.Generic..::.IEnumerable<(Of <(T>)>)
The collection whose elements are copied to the new ConcurrentStack<(Of <(T>)>).

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionThe collection argument is null.

See Also